package entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.List;

/**
 * The type User.
 */
public class User extends Common implements Serializable {
    private static final long serialVersionUID = -55028820833601661L;
    @TableId(type = IdType.ID_WORKER_STR)
    private String id;

    /**
     * 用户名
     */
    @TableField(value = "userName")
    private String userName;
    /**
     * 密码
     */

    private String password;
    /**
     * 邮箱
     */
    private String email;
    /**
     * 电话
     */
    private String mobile;
    /**
     * 删除
     */
    private Integer delete;

    private String logo;

    /**
     * To string string.
     *
     * @return the string
     */
    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", email='" + email + '\'' +
                ", mobile='" + mobile + '\'' +
                ", delete=" + delete +
                ", logo='" + logo + '\'' +
                ", roles=" + roles +
                ", roleIdList=" + roleIdList +
                ", roleId='" + roleId + '\'' +
                '}';
    }

    /**
     * Gets logo.
     *
     * @return the logo
     */
    public String getLogo() {
        return logo;
    }

    /**
     * Sets logo.
     *
     * @param logo the logo
     */
    public void setLogo(String logo) {
        this.logo = logo;
    }

    @TableField(exist = false)
    private List<Role> roles;
    @TableField(exist = false)
    private List<String> roleIdList;
    @TableField(exist = false)
    private String roleId;

    /**
     * Gets role id.
     *
     * @return the role id
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public String getRoleId() {
        return roleId;
    }

    /**
     * Sets role id.
     *
     * @param roleId the role id
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    /**
     * Gets role id list.
     *
     * @return the role id list
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public List<String> getRoleIdList() {
        return roleIdList;
    }

    /**
     * Sets role id list.
     *
     * @param roleIdList the role id list
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public void setRoleIdList(List<String> roleIdList) {
        this.roleIdList = roleIdList;
    }

    /**
     * Instantiates a new User.
     *
     * @param id         the id
     * @param userName   the user name
     * @param password   the password
     * @param email      the email
     * @param mobile     the mobile
     * @param delete     the delete
     * @param roles      the roles
     * @param roleIdList the role id list
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public User(String id, String userName, String password, String email, String mobile, Integer delete, List<Role> roles, List<String> roleIdList) {
        this.id = id;
        this.userName = userName;
        this.password = password;
        this.email = email;
        this.mobile = mobile;
        this.delete = delete;
        this.roles = roles;
        this.roleIdList = roleIdList;
    }

    /**
     * Instantiates a new User.
     *
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public User() {
    }


    /**
     * Instantiates a new User.
     *
     * @param id       the id
     * @param userName the user name
     * @param password the password
     * @param email    the email
     * @param mobile   the mobile
     * @param delete   the delete
     * @param roles    the roles
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public User(String id, String userName, String password, String email, String mobile, Integer delete, List<Role> roles) {
        this.id = id;
        this.userName = userName;
        this.password = password;
        this.email = email;
        this.mobile = mobile;
        this.delete = delete;
        this.roles = roles;
    }

    /**
     * Gets roles.
     *
     * @return the roles
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public List<Role> getRoles() {
        return roles;
    }

    /**
     * Sets roles.
     *
     * @param roles the roles
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }

    /**
     * Gets id.
     *
     * @return the id
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public String getId() {
        return id;
    }

    /**
     * Sets id.
     *
     * @param id the id
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * Gets user name.
     *
     * @return the user name
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public String getUserName() {
        return userName;
    }

    /**
     * Sets user name.
     *
     * @param userName the user name
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * Gets password.
     *
     * @return the password
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public String getPassword() {
        return password;
    }

    /**
     * Sets password.
     *
     * @param password the password
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * Gets email.
     *
     * @return the email
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public String getEmail() {
        return email;
    }

    /**
     * Sets email.
     *
     * @param email the email
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * Gets mobile.
     *
     * @return the mobile
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public String getMobile() {
        return mobile;
    }

    /**
     * Sets mobile.
     *
     * @param mobile the mobile
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    /**
     * Gets delete.
     *
     * @return the delete
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public Integer getDelete() {
        return delete;
    }

    /**
     * Sets delete.
     *
     * @param delete the delete
     * @author overlook
     * @date 2022 -04-16 20:32:54
     */
    public void setDelete(Integer delete) {
        this.delete = delete;
    }

}

